setTimeout(function () {
    var a = 'hello'
    setTimeout(function () {
        var b = 'lagou'
        setTimeout(function () {
            var c = 'I love U'
            console.log(a + b + c)
        }, 10)
    }, 10)
}, 10)

function step1() {
    var p1 = new Promise(function (resolve, reject) {
        setTimeout(function () {
            resolve('hello');
        }, 10)
    })
    return p1;
}
function step2(v) {
    var p2 = new Promise(function (resolve, reject) {
        setTimeout(function () {
            resolve(v + 'lagou');
        }, 10)
    })
    return p2;
}
function step3(v) {
    var p3 = new Promise(function (resolve, reject) {
        setTimeout(function () {
            resolve(v + 'I love U');
        }, 10)
    })
    return p3;
}

step1().then(function (v) {
    return step2(v)
}).then(function (v) {
    return step3(v)
}).then(function (result) {
    console.log(result);
})